from src.common.logger import getLogger
from langchain_ollama import OllamaEmbeddings

logger = getLogger()

class EmbeddingModel:

    def __init__(self, model_name, base_url):
        self.model_name = model_name
        self.base_url = base_url

    def new_embed_model(self):
        embed = OllamaEmbeddings(
            base_url = self.base_url,
            model = self.model_name
        )
        logger.info(f"EmbeddingModel new_embed_model: {self.model_name}")
        return embed
